<template>
  <div style="padding: 10px 2px">
    <div class="txt-box">
      <div class="left">系统名称:</div>
      <div class="right">馈电认证子系统前端控制设备</div>
    </div>
    <div class="txt-box">
      <div class="left">所属单位:</div>
      <div class="right">陕航院</div>
    </div>
    <div class="txt-box" style="margin-top: 6px">
      <div class="left" style="font-size: 14px; color: #000c17">设备监控状态信息</div>
      <div class="right"></div>
    </div>
    <div class="txt-box">
      <div class="left">馈电基带设备信息:</div>
      <div class="right"></div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">设备id:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.deviceId }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">设备ip:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.ip }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">设备名称:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.name }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">设备类型:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.type }}
      </div>
    </div>

    <div class="txt-box">
      <div class="left" style="color: #303133">设备端口:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.port }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">本机端口:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.localPort }}
      </div>
    </div>

    <div class="txt-box">
      <div class="left" style="color: #303133">所属单位:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.departments }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">位置信息:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.position }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">设备生产商:</div>
      <div class="right" style="color: #303133">
        {{ deviceData.manufacturer }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left">工作上报状态参数:</div>
      <div class="right"></div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">设备序列号:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData1 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">电压:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData2 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行自动调制编码:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData3 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行接收功率:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData4 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行信噪比:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData5 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行速率:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData6 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行 Eb/N0:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData7 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行载波同步:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData8 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行位同步:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData9 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行帧同步:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData10 }}
      </div>
    </div>
    <div class="txt-box">
      <div class="left" style="color: #303133">下行链路状态:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData11 }}
      </div>
    </div>

    <div class="txt-box">
      <div class="left" style="color: #303133">上行发送帧计数:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData12 }}
      </div>
    </div>

    <div class="txt-box">
      <div class="left" style="color: #303133">下行接收帧计数:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData13 }}
      </div>
    </div>

    <div class="txt-box">
      <div class="left" style="color: #303133">接收协议网关帧计数:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData14 }}
      </div>
    </div>

    <div class="txt-box">
      <div class="left" style="color: #303133">发射协议网关帧计数:</div>
      <div class="right" style="color: #303133">
        {{ form.workingData15 }}
      </div>
    </div>
  </div>
</template>

<script>
import analysisWorkData from './analysisWorkData'
import { httpAction, getAction } from '@api/manage'
export default {
  mixins: [analysisWorkData],
  data() {
    return {
      sctiveType: 'feedBaseband',
      deviceData: {},
      form: {
        workingData1: '',
        workingData2: '',
        workingData3: '',
        workingData4: '',
        workingData5: '',
        workingData6: '',
        workingData7: '',
        workingData8: '',
        workingData9: '',
        workingData10: '',
        workingData11: '',
        workingData12: '',
        workingData13: '',
        workingData14: '',
        workingData15: '',
      },
    }
  },
  created() {
    // setInterval(()=>{
    this.getDeviceData()

    // },2000)
  },
  methods: {
    getDeviceData() {
      getAction('/device/dmDevice/getByTopologyInstId', {
        topologyInstId: 'feedBaseband-8a329ea67d7e402a81145ef09e3ea682',
      }).then((res) => {
        if (res.success) {
          this.deviceData = res.result || {}
          this.getWorkingData()
        } else {
          this.$message.error(res.message)
        }
      })
    },
  },
}
</script>
<style scoped lang="less">
.txt-box {
  display: flex;
  font-size: 13px;
  .left {
    width: 120px;
    text-align: right;
    margin-right: 10px;
    color: #909399;
  }
}
</style>
